package com.zhiyou100.service;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.dao.StarDao;
import com.zhiyou100.model.Star;

@Service
public class StarServiceImpl implements StarService{

	@Autowired
	private StarDao stardao;
	
	@Override
	public void saveStar(Star star) {
	
		stardao.saveStar(star);
		
	}

	@Override
	public void deleteStarByPidAndUid(Integer projectId, Integer userId) {
	
		stardao.deleteStarByPidAndUid(projectId, userId);
	}

	@Override
	public ArrayList<Star> getStarByprojectIdAnduserId(Integer userId) {
		
		ArrayList<Star> stars = stardao.getStarByprojectIdAnduserId(userId);
		
		return stars;
	}
	

}
